package com.examination.to.util;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T>{

    @ApiModelProperty(value = "验证码",example = "200")
    private Integer code;
    @ApiModelProperty(value = "返回的信息",example = "成功")
    private String msg;
    @ApiModelProperty(value = "类的属性tostring（）",example = "user{  }")
    private T detail;

    public Result(Integer code, String message) {
        this(code, message, null);
    }

    @Override
    public String toString() {
        return "Result{" +
                "msg='" + msg + '\'' +
                ", code=" + code +
                ", detail=" + detail +
                '}';
    }


}
